let index = 0;  
const images = ['image1.jpg','image5.jpg', 'image6.jpg',  'image4.jpg',  'image7.jpg']; 
const backgroundContainer = document.getElementById('background-container');  
  
function changeBackground() {  
    backgroundContainer.style.backgroundImage = `url(${images[index]})`;  
    index = (index + 1) % images.length; 
}  
  

setInterval(changeBackground, 3000);  


changeBackground();

function handleRegister() {  
    // 获取表单元素  
    var username = document.getElementById('usernameLogin').value;  
    var password = document.getElementById('passwordLogin').value;  
    var confirmPassword = document.getElementById('passwordConfirm').value;  
  
    // 表单验证  
    if (password !== confirmPassword) {  
        alert('两次输入的密码不一致，请重新输入！');  
        return;  
    }  
  
    if (username.trim() === '' || password.trim() === '') {  
        alert('用户名和密码不能为空，请填写完整信息！');  
        return;  
    }  

}